<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <body>
        <ui:composition template="./../../publico/template.xhtml">
            <ui:define name="content">
                <div align="center">
                    <p:panel header="Relatórios">
                        <h:form>
                            <p:messages id="msg"/>
                            <h:panelGrid columns="1">
                                <p:panel header="Período" style="width: 100%">
                                    <h:panelGrid columns="3">
                                        <p:calendar value="#{relatorioBean.inicio}" required="true" 
                                                    requiredMessage="Informe a data de início"
                                                    pattern="dd/MM/yyyy"
                                                    locale="pt"/>
                                        <h:outputText value="à"/>
                                        <p:calendar value="#{relatorioBean.fim}" required="true" 
                                                    requiredMessage="Informe a data de fim"
                                                    pattern="dd/MM/yyyy"
                                                    locale="pt"/>
                                    </h:panelGrid>
                                </p:panel>
                                
                                <p:panel header="Gerar" style="width: 100%">
                                    <center>
                                        <h:panelGrid columns="2">
                                            <h:outputText value="Pesagem" style="color: red"/>
                                            <h:outputText value="Secagem" style="color: green" />
                                            <h:commandLink id="btnRelE"
                                                           action="#{relatorioBean.gerarPesagem}">
                                                <h:graphicImage library="imagens" name="pdf.png"/>
                                            </h:commandLink> 

                                            <h:commandLink id="btnRelS"
                                                           action="#{relatorioBean.gerarSecagem}">
                                                <h:graphicImage library="imagens" name="pdf.png"/>
                                            </h:commandLink> 
                                        </h:panelGrid>
                                    </center>
                                </p:panel>
                            </h:panelGrid>
                        </h:form>
                    </p:panel>
                </div>
            </ui:define>
        </ui:composition>
    </body>
</html>
